home *** CD-ROM | disk | FTP | other *** search
- /* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
- /* Program : tstnovel.obj */
- /* Author : Marc Chauffour */
- /* Date-written : 03/13/90 09:14am */
- /* Last-updated : */
- /* */
- /* Update :
- /* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
- /* test si novell est charge ou non : Utilise le service 0DCh de l'interrupt*/
- /* DOS 21h */
- /* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
- #define NETWARE 0xDC /* Get shell Table Adresses */
-
-
- #include <dos.h>
-
- int testnovell( void ) /* Test si novell est charge */
- {
- union REGS regs; /* definition des registres */
- struct SREGS sregs; /* Segment register */
- char work; /* connection ID regenere */
- regs.h.ah = NETWARE; /* fonction novell */
- intdosx(®s,®s,&sregs); /* interruption dos */
- if (regs.x.cflag || regs.h.al==0) return(-1); /* si on a des problemes */
- work=(regs.h.cl > '9' ? regs.h.cl-'A'+10:regs.h.cl-'0')*16 +
- (regs.h.ch > '9' ? regs.h.ch-'A'+10:regs.h.ch-'0');
- return(work==regs.h.al ? 0 : -1);
- }